{% load i18n %}
{% load jalali_view %}

<div class="ad">
	<div class="title">
		{{ object.title }}
		<span>
			{% trans "From" %}: {% jalali_view object.start_date %}
			&nbsp;&nbsp;
			{% trans "To" %}: {% jalali_view object.end_date %} 
		</span>
	</div>
	
	<div class="desc">
		<div>
			<!-- {% trans "Advertizer" %}: --> 
			<a href="/ads/explore/advertizer/{{ object.advertizer.title }}/">{{ object.advertizer }}</a>
		</div>
		
		<p>{{ object.description }}</p>
		
		{% if object.url|length > 0 %}
		<div><a href="{{ object.url }}" rel="nofollow" target="_blank">{{ object.url }}</a></div>
		{% endif %}
		
		{% for at in adtags %}
		<div style="float:right;">
			{% if at.id %}
			<a href="/ads/tag/explore/{{at.term}}/">{{ at.term }}</a>
			{% else %}
			{{ at.term }}
			{% endif %}
		</div>&nbsp;
		{% endfor %}
		<br class="clear" />
		
	</div>
	
	{% if object.enabled %}
	<div class="stat">
		{% trans "View Count" %}: {{ count_views }}
		{% if last_viewed %}
		&nbsp; &bull; &nbsp; 
		{% trans "Last Viewed" %}: {% jalali_view last_viewed %}
		{% endif %}
		&nbsp; &bull; &nbsp;
		<span class="likes" title='{% trans "I like it" %}'>{{ likes }}</span>
		&nbsp;&bull;&nbsp;
		<span class="dislikes">{{ dislikes }}</span>
		
		<span class="button-group" data-egahi-id="{{ object.id }}">
			<button id="dislike" class="end button" type="button" title='{% trans "I dislike it" %}'>
			</button><button id="like" class="start button" type="button" title='{% trans "I like it" %}'>
				<span>{% trans "I like it" %}</span>
			</button>
		</span>
		
	</div>
	{% endif %}
</div>
